import request from '@/utils/request'
import { he } from 'element-plus/es/locales.mjs';

// 文件上传
export function uploadAPI(file) { 

    //formData封装，让axios能够识别
    const formData = new FormData();
    formData.append('file', file); 

    return request({
        url: '/common/upload',
        method: 'POST',
        data: formData,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
      })
}